home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / MacPerl 5.1.3 / Mac_Perl_513_src / MacPerl5 / MacPerl.r < prev    next >
Encoding:
Text File  |  1997-01-21  |  24.7 KB  |  1,074 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MacPerl.r        -    User interface related resources
  4. Authors    :    Matthias Neeracher & Tim Endres
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MacPerl.r,v $
  12. Revision 1.1  1994/03/22  00:08:05  neeri
  13. Initial revision
  14.  
  15. Revision 0.17  1994/01/16  00:00:00  neeri
  16. 4.1.2
  17.  
  18. Revision 0.16  1994/01/12  00:00:00  neeri
  19. 4.1.1
  20.  
  21. Revision 0.15  1993/12/28  00:00:00  neeri
  22. 4.1.1b3
  23.  
  24. Revision 0.14  1993/12/20  00:00:00  neeri
  25. 4.1.1b2
  26.  
  27. Revision 0.13  1993/12/15  00:00:00  neeri
  28. 4.1.1b1
  29.  
  30. Revision 0.12  1993/10/24  00:00:00  neeri
  31. 4.1.0
  32.  
  33. Revision 0.11  1993/10/18  00:00:00  neeri
  34. b6
  35.  
  36. Revision 0.10  1993/10/13  00:00:00  neeri
  37. b5
  38.  
  39. Revision 0.9  1993/10/11  00:00:00  neeri
  40. b4
  41.  
  42. Revision 0.8  1993/09/19  00:00:00  neeri
  43. Runtime
  44.  
  45. Revision 0.7  1993/09/08  00:00:00  neeri
  46. b3
  47.  
  48. Revision 0.6  1993/08/27  00:00:00  neeri
  49. Format…
  50.  
  51. Revision 0.5  1993/08/17  00:00:00  neeri
  52. Preferences…
  53.  
  54. Revision 0.4  1993/08/15  00:00:00  neeri
  55. Credits
  56.  
  57. Revision 0.3  1993/07/13  00:00:00  neeri
  58. Options dialog
  59.  
  60. Revision 0.2  1993/05/31  00:00:00  neeri
  61. Support Console Windows
  62.  
  63. Revision 0.1  1993/05/29  00:00:00  neeri
  64. Compiles correctly
  65.  
  66. *********************************************************************/
  67.  
  68. #define SystemSevenOrLater 1
  69.  
  70. #include "Types.r"
  71. #include "SysTypes.r"
  72. #include "BalloonTypes.r"
  73. #include "AEUserTermTypes.r"
  74. #include "AERegistry.r"
  75. #include "AEObjects.r"
  76.  
  77. #include "MPRsrc.h"
  78.  
  79. include "Mercutio.rsrc";
  80.  
  81. include ":Obj:FontLDEF.rsrc";
  82.  
  83. include "MacPerl.rsrc" 'BNDL'(128);
  84. include "MacPerl.rsrc" 'McPL'(0);
  85. include "MacPerl.rsrc" 'ICN#'(128);
  86. include "MacPerl.rsrc" 'icl4'(128);
  87. include "MacPerl.rsrc" 'icl8'(128);
  88. include "MacPerl.rsrc" 'ics#'(128);
  89. include "MacPerl.rsrc" 'ics4'(128);
  90. include "MacPerl.rsrc" 'ics8'(128);
  91. include "MacPerl.rsrc" 'BNDL'(129)     as 'MrPB'(128);
  92. include "MacPerl.rsrc" 'MrPL'(0);
  93. include "MacPerl.rsrc" 'ICN#'(132)     as 'MrPI'(128);
  94. include "MacPerl.rsrc" 'icl4'(132)     as 'MrP4'(128);
  95. include "MacPerl.rsrc" 'icl8'(132)     as 'MrP8'(128);
  96. include "MacPerl.rsrc" 'ics#'(132)     as 'MrP#'(128);
  97. include "MacPerl.rsrc" 'ICN#'(134);
  98. include "MacPerl.rsrc" 'icl4'(134);
  99. include "MacPerl.rsrc" 'icl8'(134);
  100. include "MacPerl.rsrc" 'ics#'(134);
  101. include "MacPerl.rsrc" 'DITL'(258);
  102. include "MacPerl.rsrc" 'DLOG'(258);
  103. include "MacPerl.rsrc" 'FREF'(128);
  104. include "MacPerl.rsrc" 'FREF'(129);
  105. include "MacPerl.rsrc" 'FREF'(130);
  106. include "MacPerl.rsrc" 'FREF'(131);
  107. include "MacPerl.rsrc" 'FREF'(132);
  108. include "MacPerl.rsrc" 'FREF'(133);
  109. include "MacPerl.rsrc" 'FREF'(134);
  110. include "MacPerl.rsrc" 'FREF'(135);
  111. include "MacPerl.rsrc" 'FREF'(136);
  112. include "MacPerl.rsrc" 'ICN#'(129);
  113. include "MacPerl.rsrc" 'ICN#'(130);
  114. include "MacPerl.rsrc" 'ICN#'(131);
  115. include "MacPerl.rsrc" 'ICN#'(385);
  116. include "MacPerl.rsrc" 'ICN#'(386);
  117. include "MacPerl.rsrc" 'ICN#'(387);
  118. include "MacPerl.rsrc" 'ICN#'(388);
  119. include "MacPerl.rsrc" 'PICT'(128);
  120. include "MacPerl.rsrc" 'PICT'(129);
  121. include "MacPerl.rsrc" 'PICT'(130);
  122. include "MacPerl.rsrc" 'snd '(128);
  123. include "MacPerl.rsrc" 'snd '(129);
  124. include "MacPerl.rsrc" 'icl4'(129);
  125. include "MacPerl.rsrc" 'icl4'(130);
  126. include "MacPerl.rsrc" 'icl4'(131);
  127. include "MacPerl.rsrc" 'icl4'(385);
  128. include "MacPerl.rsrc" 'icl4'(386);
  129. include "MacPerl.rsrc" 'icl4'(387);
  130. include "MacPerl.rsrc" 'icl4'(388);
  131. include "MacPerl.rsrc" 'icl8'(129);
  132. include "MacPerl.rsrc" 'icl8'(130);
  133. include "MacPerl.rsrc" 'icl8'(131);
  134. include "MacPerl.rsrc" 'icl8'(385);
  135. include "MacPerl.rsrc" 'icl8'(386);
  136. include "MacPerl.rsrc" 'icl8'(387);
  137. include "MacPerl.rsrc" 'icl8'(388);
  138. include "MacPerl.rsrc" 'icm#'(256);
  139. include "MacPerl.rsrc" 'icm#'(257);
  140. include "MacPerl.rsrc" 'icm#'(264);
  141. include "MacPerl.rsrc" 'icm#'(265);
  142. include "MacPerl.rsrc" 'icm#'(266);
  143.  
  144. #define GUSI_PREF_VERSION '0150'
  145.  
  146. #include "GUSI.r"
  147.  
  148. include "Perl.rsrc";
  149.  
  150. resource 'GU∑I' (GUSIRsrcID) {
  151.     text, mpw, noAutoSpin, useChdir, approxStat, 
  152.     noTCPDaemon, noUDPDaemon, 
  153.     hasConsole,
  154.     {};
  155. };
  156.  
  157.  
  158. #ifdef APPNAME    // only include 'cfrg' in native PowerPC apps
  159.  
  160. #include "CodeFragmentTypes.r"
  161.  
  162. resource 'cfrg' (0) {
  163.     {
  164.         kPowerPC,
  165.         kFullLib,
  166.         kNoVersionNum,kNoVersionNum,
  167.         0,0,
  168.         kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork,
  169.         APPNAME    // must be defined on Rez command line with -d option
  170.     }
  171. };
  172.  
  173. #endif
  174.  
  175. resource 'vers' (1) {
  176.     0x05, 0x13, release, 0x02, verUS,
  177.     "5.1.3r2",
  178.     "MacPerl - ported by Matthias Neeracher."
  179.     };
  180.  
  181. resource 'vers' (2) {
  182.     0x05, 0x13, release, 0x02, verUS,
  183.     "5.1.3r2",
  184.     "Perl 5.1.3r2 (21Jan97)"
  185.     };
  186.  
  187. resource 'STR#' (CreditID) {
  188.     {
  189.         "Kenneth Albanowski",
  190.         "Charles Albrecht",
  191.         "Larry Allen-Tonar",
  192.         "Kevin Altis",
  193.         "Phil Ames",
  194.         "Roberto Avanzi",
  195.         "Peter Van Avermaet",
  196.         "Charles Bailey",
  197.         "Stonewall Ballard",
  198.         "Joaquim Baptista",
  199.         "Berardino Baratta",
  200.         "Joe Bearly",
  201.         "Benjamin Beberness",
  202.         "Devin Ben-Hur",
  203.         "Paddy Benson",
  204.         "William Birkett",
  205.         "David Blank-Edelman",
  206.         "Steve Bollinger",
  207.         "Vicki Brown",
  208.         "Jason Buberel",
  209.         "James Burgess",
  210.         "Alun Carr",
  211.         "Sam Choukri",
  212.         "Jürgen Christoffel",
  213.         "Henry Churchyard",
  214.         "Robert Coie",
  215.         "Scott Collins",
  216.         "Brad Cox",
  217.         "Peter Creath",
  218.         "Kevin Cutts",
  219.         "Robert Decker",
  220.         "Steve Dorner",
  221.         "Paul Duda",
  222.         "Torsten Ekedahl",
  223.         "Tim Endres",
  224.         "Gus Fernandez",
  225.         "Glenn Fleishman",
  226.         "Brian Foy",
  227.         "David Friedlander",
  228.         "Alan Fry",
  229.         "Greg Galanos", 
  230.         "Steve Goodwin",
  231.         "Guy Greenbaum",
  232.         "Janis Greenberg",
  233.         "Michael Greenspon",
  234.         "Sal Gurnani",
  235.         "David Hansen",
  236.         "Steve Hampson",
  237.         "Brad Hanson",
  238.         "Toni Harbaugh",
  239.         "Martin Heller",
  240.         "Todd Hivnor",
  241.         "C. Joe Holmes",
  242.         "Stewart Holt",
  243.         "Tom Holub",
  244.         "Christian Huldt",
  245.         "Jeff Johnson",
  246.         "John Kamp",
  247.         "Dick Karpinski",
  248.         "Jim Kateley",
  249.         "Pete Keleher",
  250.         "Thomas Kimpton",
  251.         "Andreas König",
  252.         "Gary LaVoy",
  253.         "Thomas Lenggenhager",
  254.         "Peter Lewis",
  255.         "John Liberty",
  256.         "Ron Liechty",
  257.         "Jann Linder",
  258.         "Roger Linder",
  259.         "Angus McIntyre",
  260.         "Mike Meckler",
  261.         "William Middleton",
  262.         "Peter Möller",
  263.         "Richard Moe",
  264.         "Bill Moore",
  265.         "Chris Myers",
  266.         "Chris Nandor",
  267.         "Asa Packer",
  268.         "Paul Patton",
  269.         "Mark Pease",
  270.         "Lasse Petersen",
  271.         "John Peterson",
  272.         "Brad Pickering",
  273.         "Marco Piovanelli",
  274.         "Tom Pollard",
  275.         "Simon Poole",
  276.         "Malcolm Pradhan",
  277.         "Quinn",
  278.         "Alasdair Rawsthorne",
  279.         "Charlie Reiman",
  280.         "King Rhoton",
  281.         "Diller Ryan",
  282.         "Paul Schinder",
  283.         "Matthias Schmitt",
  284.         "Shimizu Shu",
  285.         "Sandra Silcot",
  286.         "Paul Snively",
  287.         "Omar Souka",
  288.         "Jon Stevens",
  289.         "Dan Strnad",
  290.         "Ken Stuart",
  291.         "Man Wei Tam",
  292.         "Danny Thomas",
  293.         "Chris Thorman",
  294.         "James Tisdall",
  295.         "Werner Uhrig",
  296.         "Maki Watanabe",
  297.         "Scott Weaver",
  298.         "Mike West",
  299.         "Peter Whaite",
  300.         "Forrest Whitcher",
  301.         "Hal Wine",
  302.         "Dave Wodelet",
  303.         "Barry Wolman",
  304.         "Michael Wu",
  305.         "Yuemo Zeng",
  306.         "… and many others.",
  307.     }
  308. };
  309.  
  310. resource 'SIZE' (-1) {
  311.     dontSaveScreen,
  312.     acceptSuspendResumeEvents,
  313.     enableOptionSwitch,
  314.     canBackground,
  315.     multiFinderAware,
  316.     backgroundAndForeground,
  317.     dontGetFrontClicks,
  318.     ignoreChildDiedEvents,
  319.     is32BitCompatible,
  320.     isHighLevelEventAware,
  321.     localAndRemoteHLEvents,
  322.     reserved,
  323.     reserved,
  324.     reserved,
  325.     reserved,
  326.     reserved,
  327.     2560 * 1024,
  328.     1536 * 1024
  329. };
  330.  
  331. type 'MrPS' as 'SIZE';
  332.  
  333. resource 'MrPS' (-1) {
  334.     dontSaveScreen,
  335.     acceptSuspendResumeEvents,
  336.     enableOptionSwitch,
  337.     canBackground,
  338.     multiFinderAware,
  339.     backgroundAndForeground,
  340.     dontGetFrontClicks,
  341.     ignoreChildDiedEvents,
  342.     is32BitCompatible,
  343.     isHighLevelEventAware,
  344.     localAndRemoteHLEvents,
  345.     reserved,
  346.     reserved,
  347.     reserved,
  348.     reserved,
  349.     reserved,
  350.     65536,
  351.     65536
  352. };
  353.  
  354. /************************** Window templates **************************/
  355.  
  356. resource 'WIND' (WindowTemplates, "", purgeable) {
  357.     {18, 48, 312, 488},
  358.     zoomDocProc,
  359.     invisible,
  360.     goAway,
  361.     0x0,
  362.     Untitled, 
  363.     noAutoCenter
  364. };
  365.  
  366. resource 'WIND' (WindowTemplates+1, "", purgeable) {
  367.     {18, 48, 312, 488},
  368.     zoomDocProc,
  369.     invisible,
  370.     goAway,
  371.     0x0,
  372.     "MacPerl",
  373.     noAutoCenter
  374. };
  375.  
  376. resource 'WIND' (WindowTemplates+2, "", purgeable) {
  377.     {18, 48, 312, 488},
  378.     zoomDocProc,
  379.     invisible,
  380.     goAway,
  381.     0x0,
  382.     Untitled,
  383.     noAutoCenter
  384. };
  385.  
  386. /************************** MacPerl'Answer Dialog **************************/
  387.  
  388. resource 'DLOG' (2001)    {
  389.     {  0,   0, 150, 400},
  390.     dBoxProc,
  391.     invisible,
  392.     noGoAway,
  393.     0,
  394.     2001,
  395.     "",
  396.     alertPositionMainScreen
  397. };
  398.  
  399. resource 'DITL' (2001)    {
  400.     {
  401.         {119,  307, 137,  387}, Button         { enabled, "^1"},
  402.         {119, 8406, 137, 8486}, Button         { enabled, "^2"},
  403.         {119, 8313, 137, 8393}, Button         { enabled, "^3"},
  404.         { 13,   23,  45,   55}, Icon            {disabled, 0    },
  405.         { 13,   78, 103,  387}, StaticText    {disabled, "^0"}
  406.     }
  407. };
  408.  
  409.  
  410. resource 'DLOG' (2002)    {
  411.     {  0,   0, 150, 400},
  412.     dBoxProc,
  413.     invisible,
  414.     noGoAway,
  415.     0,
  416.     2002,
  417.     "",
  418.     alertPositionMainScreen
  419. };
  420.  
  421. resource 'DITL' (2002)    {
  422.     {
  423.         {119,  307, 137,  387}, Button         { enabled, "^1"},
  424.         {119,  214, 137,  294}, Button         { enabled, "^2"},
  425.         {119, 8313, 137, 8393}, Button         { enabled, "^3"},
  426.         { 13,   23,  45,   55}, Icon            {disabled, 2    },
  427.         { 13,   78, 103,  387}, StaticText    {disabled, "^0"}
  428.     }
  429. };
  430.  
  431. resource 'DLOG' (2003)    {
  432.     {  0,   0, 150, 400},
  433.     dBoxProc,
  434.     invisible,
  435.     noGoAway,
  436.     0,
  437.     2003,
  438.     "",
  439.     alertPositionMainScreen
  440. };
  441.  
  442. resource 'DITL' (2003)    {
  443.     {
  444.         {119, 307, 137, 387}, Button         { enabled, "B1"},
  445.         {119, 214, 137, 294}, Button         { enabled, "B2"},
  446.         {119, 121, 137, 201}, Button         { enabled, "B3"},
  447.         { 13,  23,  45,  55}, Icon            {disabled, 2    },
  448.         { 13,  78, 103, 387}, StaticText    {disabled, "Prompt"}
  449.     }
  450. };
  451.  
  452. /************************** MacPerl'Ask Dialogs **************************/
  453.  
  454. resource 'DLOG' (2010) {
  455.     {0, 0, 104, 400},
  456.     dBoxProc,
  457.     invisible,
  458.     noGoAway,
  459.     'tmDI',
  460.     2010,
  461.     "",
  462.     alertPositionMainScreen
  463. };
  464.  
  465. resource 'DITL' (2010, "Ask", purgeable) {
  466.     {
  467.         {73, 307, 91, 387}, Button             { enabled, "OK"},
  468.         {73, 214, 91, 294},    Button             { enabled, "Cancel"},
  469.         {13,  13, 31, 387},    StaticText         {disabled, "^0"},
  470.         {44,  15, 60, 385}, EditText             {disabled, ""}
  471.     }
  472. };
  473.  
  474. /************************** MacPerl'Pick Dialog **************************/
  475.  
  476. resource 'DLOG' (2020) {
  477.     {38, 80, 245, 427},
  478.     dBoxProc,
  479.     invisible,
  480.     noGoAway,
  481.     0x0,
  482.     2020,
  483.     "",
  484.     alertPositionMainScreen
  485. };
  486.  
  487. resource 'DITL' (2020) {
  488.     {
  489.         {178,  30, 198,  88},    Button         { enabled, "OK"},
  490.         {178, 258, 198, 316},    Button         { enabled, "Cancel"},
  491.         {  2,   2,  19, 373},    StaticText     {disabled, "Prompt"},
  492.         { 19,   2, 168, 345},    UserItem     {disabled}
  493.     }
  494. };
  495.  
  496. /************************** Error Dialog **************************/
  497.  
  498. resource 'ALRT' (ErrorAlert, "", purgeable) {
  499.     {82, 104, 212, 426},
  500.     ErrorAlert,
  501.     {    OK, visible, silent,
  502.         OK, visible, silent,
  503.         OK, visible, silent,
  504.         OK, visible, silent
  505.     },
  506.     alertPositionMainScreen
  507. };
  508.  
  509. resource 'DITL' (ErrorAlert, "", purgeable) {
  510.     {    { 98, 240, 118, 300}, Button {enabled, "OK"},
  511.         {  9,  57,  86, 300}, StaticText {enabled, "^0^1^2^3"},
  512.         {  9,   7,  41,  39}, Icon {enabled, 1}
  513.     }
  514. };
  515.  
  516. /************************** Save Changes Dialog **************************/
  517.  
  518. resource 'ALRT' (SaveAlert, "", purgeable) {
  519.     {86, 60, 190, 432},
  520.     SaveAlert,
  521.     {    OK, visible, silent,
  522.         OK, visible, silent,
  523.         OK, visible, silent,
  524.         OK, visible, silent
  525.     },
  526.     alertPositionParentWindow
  527. };
  528.  
  529. resource 'DITL' (SaveAlert) {
  530.     {    { 74, 303,  94, 362}, Button         { enabled, "Save"},
  531.         { 74,  65,  94, 150}, Button         { enabled, "Don’t Save"},
  532.         { 74, 231,  94, 290}, Button         { enabled, "Cancel"},
  533.         { 10,  65,  59, 363}, StaticText {disabled, "Save changes to “^0”?"},
  534.         { 10,  20,  42,  52}, Icon         {disabled, 2},
  535.         {  0,   0,   0,   0}, HelpItem     {disabled, HMScanhdlg { SaveAlert } },
  536.     }
  537. };
  538.  
  539. /************************** Revert Dialog **************************/
  540.  
  541. resource 'ALRT' (RevertAlert, "", purgeable) {
  542.     {86, 60, 190, 432},
  543.     RevertAlert,
  544.     {    OK, visible, silent,
  545.         OK, visible, silent,
  546.         OK, visible, silent,
  547.         OK, visible, silent
  548.     },
  549.     alertPositionParentWindow
  550. };
  551.  
  552. resource 'DITL' (RevertAlert) {
  553.     {    { 74, 303,  94, 362}, Button         { enabled, "Revert"},
  554.         { 74, 231,  94, 290}, Button         { enabled, "Cancel"},
  555.         { 10,  65,  59, 363}, StaticText {disabled, "Revert to the last saved version of “^0”?"},
  556.         { 10,  20,  42,  52}, Icon         {disabled, 2},
  557.         {  0,   0,   0,   0}, HelpItem     {disabled, HMScanhdlg { RevertAlert } },
  558.     }
  559. };
  560.  
  561. /************************** Revert Dialog **************************/
  562.  
  563. resource 'ALRT' (HelperAlert, "", purgeable) {
  564.     {86, 60, 222, 432},
  565.     HelperAlert,
  566.     {    OK, visible, silent,
  567.         OK, visible, silent,
  568.         OK, visible, silent,
  569.         OK, visible, silent
  570.     },
  571.     alertPositionParentWindow
  572. };
  573.  
  574. resource 'DITL' (HelperAlert) {
  575.     {    {106, 193, 126, 362}, Button     { enabled, "Launch Internet Config"},
  576.         {106, 121, 126, 180}, Button     { enabled, "Cancel"},
  577.         { 10,  65,  91, 363}, StaticText{disabled, 
  578.             "Could not find helper for “^0”. Do you want to create one?\n\n"
  579.             "For “file”, you should specify a WWW browser as the helper."
  580.                                         },
  581.         { 10,  20,  42,  52}, Icon         {disabled, 2},
  582.         {  0,   0,   0,   0}, HelpItem     {disabled, HMScanhdlg { HelperAlert } },
  583.     }
  584. };
  585.  
  586. /************************** Abort Dialog **************************/
  587.  
  588. resource 'ALRT' (AbortAlert, "", purgeable) {
  589.     {86, 60, 190, 432},
  590.     AbortAlert,
  591.     {    OK, visible, silent,
  592.         OK, visible, silent,
  593.         OK, visible, silent,
  594.         OK, visible, silent
  595.     },
  596.     alertPositionParentWindow
  597. };
  598.  
  599. resource 'DITL' (AbortAlert) {
  600.     {    { 74, 303,  94, 362}, Button         { enabled, "Quit"},
  601.         { 74, 231,  94, 290}, Button         { enabled, "Cancel"},
  602.         { 10,  65,  59, 363}, StaticText {disabled, "Quit (and abort current Perl script)?"},
  603.         { 10,  20,  42,  52}, Icon         {disabled, 2},
  604.         {  0,   0,   0,   0}, HelpItem     {disabled, HMScanhdlg { AbortAlert } },
  605.     }
  606. };
  607.  
  608. /************************** Format Dialog **************************/
  609.  
  610. resource 'DLOG' (FormatDialog, "", purgeable) {
  611.     {68, 52, 245, 435},
  612.     movableDBoxProc,
  613.     invisible,
  614.     goAway,
  615.     0x0,
  616.     FormatDialog,
  617.     "Format",
  618.     alertPositionParentWindow
  619. };
  620.  
  621. resource 'DITL' (FormatDialog, purgeable) {
  622.     {    {104, 268, 124, 341},    Button         { enabled, "OK"                },
  623.         {135, 268, 156, 341},    Button         { enabled, "Cancel"            },
  624.         { 28,  11, 156, 170},    UserItem     { enabled                        },
  625.         { 60, 181, 156, 219},    UserItem     { enabled                        },
  626.         { 28, 233, 156, 234},    UserItem     {disabled                        },
  627.         {104, 268, 124, 341},    UserItem     {disabled                        },
  628.         { 30, 183,  46, 217},    EditText     {disabled, ""                    },
  629.         { 42, 245,  62, 372},    CheckBox     { enabled, "Make Default"    },
  630.         {  7,  15,  25,  53},    StaticText    {disabled, "Font"                },
  631.         {  7, 184,  25, 217},    StaticText     {disabled, "Size"                },
  632.         {  0,   0,   0,   0},     HelpItem     { disabled, HMScanhdlg { FormatDialog } },
  633.     }
  634. };
  635.  
  636. /************************** Preferences Dialog **************************/
  637.  
  638. resource 'DLOG' (PrefDialog, "", purgeable) {
  639.     {0, 0, 250, 400},
  640.     movableDBoxProc,
  641.     invisible,
  642.     goAway,
  643.     'tmDI',
  644.     PrefDialog,
  645.     "Preferences",
  646.     alertPositionMainScreen
  647. };
  648.  
  649. resource 'DITL' (PrefDialog, "", purgeable) {
  650.     {    {  0,  28,  32,  60}, UserItem { enabled },
  651.         {  0,  98,  32, 130}, UserItem { enabled },
  652.         {  0, 168,  32, 200}, UserItem { enabled },
  653.         {  0, 238,  32, 270}, UserItem { enabled },
  654.         { 53,   0,  54, 400}, UserItem { disabled },
  655.         {  0,   0,   0,   0}, HelpItem { disabled, HMScanhdlg { PrefDialog } },
  656.         { 20, 330,  40, 380}, Button   { enabled, "Done"},
  657.         { 20, 330,  40, 380}, UserItem { disabled }
  658.     }
  659. };
  660.  
  661. resource 'dctb' (PrefDialog, "", purgeable) {
  662.     {
  663.     }
  664. };
  665.  
  666. resource 'STR#' (PrefDialog) {
  667.     {    "Libraries",
  668.         "Scripts",
  669.         "Input",
  670.         "Others",
  671.         "Change Path:",
  672.         "Add Path:"
  673.     }
  674. };
  675.  
  676. resource 'DITL' (PrefLibID, "", purgeable) {
  677.     {    { 60,  10, 220, 375}, UserItem { disabled },
  678.         {225,  25, 245, 145}, Button     { enabled, "Remove Path(s)"     },
  679.         {225, 255, 245, 375}, Button     { enabled, "Add Path…"            }
  680.     }
  681. };
  682.  
  683. resource 'ALRT' (PrefLibDelID, "", purgeable) {
  684.     {108, 158, 238, 476},
  685.     PrefLibDelID,
  686.     {    Cancel, visible, sound1,
  687.         Cancel, visible, sound1,
  688.         Cancel, visible, sound1,
  689.         Cancel, visible, sound1
  690.     },
  691.     alertPositionParentWindow
  692. };
  693.  
  694. resource 'DITL' (PrefLibDelID, "", purgeable) {
  695.     {    { 98, 227, 119, 292}, Button { enabled, "Delete"},
  696.         { 98,  27, 119,  92}, Button { enabled, "Cancel"},
  697.         {  9,  63,  89, 294}, StaticText {disabled, "Are you sure you want to delete the selected paths ?"},
  698.         { 10,  11,  42,  43}, Icon { disabled, 1 }
  699.     }
  700. };
  701.  
  702. resource 'DITL' (PrefScriptID, "", purgeable) {
  703.     {    { 80,  25, 100,  80}, RadioButton { enabled, "Edit"     },
  704.         {100,  25, 120,  80}, RadioButton { enabled, "Run"     },
  705.         {140,  25, 160, 375}, CheckBox     { enabled, "Check for #! line"},
  706.         { 93,  80, 113, 375}, StaticText  {disabled, "Scripts opened from Finder"}
  707.     }
  708. };
  709.  
  710. resource 'DITL' (PrefInputID, "", purgeable) {
  711.     {    { 80,  25, 100, 200}, CheckBox { enabled, "Enable inline input"     },
  712.     }
  713. };
  714.  
  715. resource 'DITL' (PrefConfigID, "", purgeable) {
  716.     {    { 80,  25, 100, 200}, Button { enabled, "Launch Internet Config"     },
  717.     }
  718. };
  719.  
  720. /************************** General Error Dialog **************************/
  721.  
  722. resource 'ALRT' (300, "Error Alert", purgeable) {
  723.     {108, 158, 238, 476},
  724.     300,
  725.     {    /* array: 4 elements */
  726.         /* [1] */
  727.         OK, visible, sound1,
  728.         /* [2] */
  729.         OK, visible, sound1,
  730.         /* [3] */
  731.         OK, visible, sound1,
  732.         /* [4] */
  733.         OK, visible, sound1
  734.     },
  735.     alertPositionMainScreen
  736. };
  737.  
  738. resource 'DITL' (300, "", purgeable) {
  739.     {    /* array DITLarray: 3 elements */
  740.         /* [1] */
  741.         {98, 227, 119, 292},
  742.         Button {
  743.             enabled,
  744.             "Oh well"
  745.         },
  746.         /* [2] */
  747.         {9, 63, 89, 294},
  748.         StaticText {
  749.             enabled,
  750.             "Sorry an error has occured in the area o"
  751.             "f ^0. \nThe error code = ^1\n(^2)"
  752.         },
  753.         /* [3] */
  754.         {10, 11, 42, 43},
  755.         Icon {
  756.             enabled,
  757.             0
  758.         }
  759.     }
  760. };
  761.  
  762. /************************** Printing Progress Dialog **************************/
  763.  
  764. resource 'DLOG' (1005, "printing...", purgeable) {
  765.     {148, 157, 185, 354},
  766.     dBoxProc,
  767.     visible,
  768.     noGoAway,
  769.     0x0,
  770.     1005,
  771.     "printing…",
  772.     alertPositionParentWindow
  773. };
  774.  
  775. resource 'DITL' (1005, "printing...", purgeable) {
  776.     {    /* array DITLarray: 1 elements */
  777.         /* [1] */
  778.         {10, 10, 27, 235},
  779.         StaticText {
  780.             disabled,
  781.             "Type \0x11. to cancel printing"
  782.         }
  783.     }
  784. };
  785.  
  786. /************************** 7.0 only alert **************************/
  787.  
  788. resource 'ALRT' (302, "7.0 Only Alert") {
  789.     {50, 60, 192, 350},
  790.     302,
  791.     {    /* array: 4 elements */
  792.         /* [1] */
  793.         OK, visible, sound1,
  794.         /* [2] */
  795.         OK, visible, sound1,
  796.         /* [3] */
  797.         OK, visible, sound1,
  798.         /* [4] */
  799.         OK, visible, sound1
  800.     },
  801.     noAutoCenter
  802. };
  803.  
  804. resource 'DITL' (302) {
  805.     {    /* array DITLarray: 3 elements */
  806.         /* [1] */
  807.         {108, 213, 128, 273},
  808.         Button {
  809.             enabled,
  810.             "OK"
  811.         },
  812.         /* [2] */
  813.         {11, 63, 79, 278},
  814.         StaticText {
  815.             disabled,
  816.             "MacPerl requires System 7.0 or later to run."
  817.         },
  818.         /* [3] */
  819.         {11, 12, 43, 44},
  820.         Icon {
  821.             enabled,
  822.             0
  823.         }
  824.     }
  825. };
  826.  
  827. /************************** Save Dialog **************************/
  828.  
  829. resource 'DLOG' (SaveScriptDialog, purgeable) {
  830.     {30, 8, 260, 352},
  831.     dBoxProc,
  832.     invisible,
  833.     noGoAway,
  834.     'tmDI',
  835.     SaveScriptDialog,
  836.     "Put File",
  837.     noAutoCenter 
  838. };
  839.  
  840. resource 'DITL' (SaveScriptDialog, purgeable) {
  841.     {    {161, 252, 181, 332}, Button         { enabled, "Save"                 },
  842.         {130, 252, 150, 332}, Button         { enabled, "Cancel"                 },
  843.         {  0,   0,   0,   0}, HelpItem     { disabled, HMScanhdlg {-6043}},
  844.         {  8, 235,  24, 337}, UserItem     { enabled                             },
  845.         { 32, 252,  52, 332}, Button         { enabled, "Eject"                 },
  846.         { 60, 252,  80, 332}, Button         { enabled, "Desktop"             },
  847.         { 29,  12, 127, 230}, UserItem     { enabled                             },
  848.         {  6,  12,  25, 230}, UserItem     { enabled                             },
  849.         {119, 250, 120, 334}, Picture     { disabled, 11                        },
  850.         {157,  15, 173, 227}, EditText     { enabled, ""                         },
  851.         {136,  15, 152, 227}, StaticText { disabled, "Save as:"             },
  852.         { 88, 252, 108, 332}, UserItem     { disabled                             },
  853.         {187,  17, 206, 283}, Control     { enabled, SaveScriptDialog    },
  854.     }
  855. };
  856.  
  857. resource 'CNTL' (SaveScriptDialog, preload, purgeable) {
  858.     {187,  17, 206, 283},        /*enclosing rectangle of control*/
  859.     popupTitleLeftJust,             /*title position*/
  860.     visible,                         /*make control visible*/ 
  861.     50,                                 /*pixel width of title*/
  862.     SaveScriptDialog,             /*'MENU' resource ID*/
  863.     popupMenuCDEFProc,            /*pop-up control definition ID*/ 
  864.     0,                                 /*reference value*/
  865.     "Type:"                            /*control title*/
  866. };
  867.  
  868. resource 'MENU' (SaveScriptDialog) {
  869.     SaveScriptDialog,
  870.     textMenuProc,
  871.     0x7FFFFFFF,
  872.     enabled,
  873.     "Type",
  874.     {    "Plain Text",                 noIcon, noKey, noMark, plain,
  875.         "Runtime Version",         noIcon, noKey, noMark, plain
  876.     }
  877. };
  878.  
  879. /************************** No Perl Script Dialog **************************/
  880.  
  881. resource 'ALRT' (NoPerlAlert, "", purgeable) {
  882.     {86, 40, 230, 472},
  883.     NoPerlAlert,
  884.     {    OK, visible, silent,
  885.         OK, visible, silent,
  886.         OK, visible, silent,
  887.         OK, visible, silent
  888.     },
  889.     alertPositionParentWindow
  890. };
  891.  
  892. resource 'DITL' (NoPerlAlert) {
  893.     {    {114, 323, 134, 402}, Button         { enabled, "Proceed"},
  894.         {114, 231, 134, 310}, Button         { enabled, "Abort"},
  895.         { 10,  65,  99, 403}, StaticText {disabled, 
  896.             "I'm not sure “^0” is really a Perl script (the #! line is missing). "
  897.             "Still want to proceed with trying to execute this script?"
  898.                                                     },
  899.         { 10,  20,  42,  52}, Icon         {disabled, 2}
  900.     }
  901. };
  902.  
  903. /************************** File too bulky to open Dialog **************************/
  904.  
  905. resource 'ALRT' (ElvisAlert, "", purgeable) {
  906.     {86, 40, 210, 452},
  907.     ElvisAlert,
  908.     {    OK, visible, silent,
  909.         OK, visible, silent,
  910.         OK, visible, silent,
  911.         OK, visible, silent
  912.     },
  913.     alertPositionParentWindow
  914. };
  915.  
  916. resource 'DITL' (ElvisAlert) {
  917.     {    { 94, 323, 114, 402}, Button         { enabled, "Save"},
  918.         { 94, 231, 114, 310}, Button         { enabled, "Cancel"},
  919.         { 10,  65,  79, 403}, StaticText {disabled, 
  920.             "This file is too big to be edited in MacPerl. "
  921.             "You may, however, save it as a MacPerl script or runtime."
  922.                                                     },
  923.         { 10,  20,  42,  52}, Icon         {disabled, 2}
  924.     }
  925. };
  926.  
  927. resource 'ALRT' (ElvisEditAlert, "", purgeable) {
  928.     {86, 40, 210, 452},
  929.     ElvisEditAlert,
  930.     {    OK, visible, silent,
  931.         OK, visible, silent,
  932.         OK, visible, silent,
  933.         OK, visible, silent
  934.     },
  935.     alertPositionParentWindow
  936. };
  937.  
  938. resource 'DITL' (ElvisEditAlert) {
  939.     {    { 94, 323, 114, 402}, Button         { enabled, "Save"},
  940.         { 94,  21, 114, 100}, Button         { enabled, "Cancel"},
  941.         { 94, 231, 114, 310}, Button         { enabled, "Edit"},
  942.         { 10,  65,  79, 403}, StaticText {disabled, 
  943.             "This file is too big to be edited in MacPerl. "
  944.             "You may, however, either save it as a MacPerl "
  945.             "script or runtime or edit it with your external editor."
  946.                                                     },
  947.         { 10,  20,  42,  52}, Icon         {disabled, 2}
  948.     }
  949. };
  950.  
  951. /************************** Menus **************************/
  952.  
  953. resource 'MENU' (appleID) {
  954.     appleID,
  955.     19999,
  956.     0x7FFFFFFD,
  957.     enabled,
  958.     apple,
  959.     {    /* array: 2 elements */
  960.         /* [1] */
  961.         "About MacPerl…", noIcon, noKey, noMark, plain,
  962.         /* [2] */
  963.         "-", noIcon, noKey, noMark, plain
  964.     }
  965. };
  966.  
  967. resource 'MENU' (fileID) {
  968.     fileID,
  969.     19999,
  970.     0b101101111011,
  971.     enabled,
  972.     "File",
  973.     {    "New",             noIcon, "N",     noMark, plain,
  974.         "Open…",         noIcon, "O",     noMark, plain,
  975.         "-",                 noIcon, noKey, noMark, plain,
  976.         "Close",         noIcon, "W",     noMark, plain,
  977.         "Save",             noIcon, "S",     noMark, plain,
  978.         "Save As…",     noIcon, "S",     noMark, extend,
  979.         "Revert",         noIcon, noKey, noMark, plain,
  980.         "-",                 noIcon, noKey, noMark, plain,
  981.         "Page Setup…", noIcon, noKey, noMark, plain,
  982.         "Print…",         noIcon, "P",     noMark, plain,
  983.         "-",                 noIcon, noKey, noMark, plain,
  984.         "Quit",             noIcon, "Q",     noMark, plain
  985.     }
  986. };
  987.  
  988. resource 'MENU' (editID) {
  989.     editID,
  990.     19999,
  991.     0b101111010101111101,
  992.     enabled,
  993.     "Edit",
  994.     {    "Undo", noIcon, "Z", noMark, plain,
  995.         "-", noIcon, noKey, noMark, plain,
  996.         "Cut", noIcon, "X", noMark, plain,
  997.         "Copy", noIcon, "C", noMark, plain,
  998.         "Paste", noIcon, "V", noMark, plain,
  999.         "Clear", noIcon, noKey, noMark, plain,
  1000.         "Select All", noIcon, "A", noMark, plain,
  1001.         "-", noIcon, noKey, noMark, plain,
  1002.         "Jump to…", noIcon, "J", noMark, plain,        
  1003.         "-", noIcon, noKey, noMark, plain,
  1004.         "Format…", noIcon, "Y", noMark, plain,
  1005. #ifdef EVIL_USELESS_EDITIONS
  1006.         "-", noIcon, noKey, noMark, plain,
  1007.         "Create Publisher…", noIcon, noKey, noMark, plain,
  1008.         "Subscribe To…", noIcon, noKey, noMark, plain,
  1009.         "Section Options…", noIcon, noKey, noMark, plain,
  1010.         "Show Borders", noIcon, noKey, noMark, plain,
  1011. #endif
  1012.         "-", noIcon, noKey, noMark, plain,
  1013.         "Preferences…", noIcon, noKey, noMark, plain,
  1014.     }
  1015. };
  1016.  
  1017. resource 'MENU' (windowID, preload) {
  1018.     windowID,
  1019.     19999,
  1020.     allEnabled,
  1021.     enabled,
  1022.     "Window",
  1023.     {
  1024.     }
  1025. };
  1026.  
  1027. resource 'MENU' (perlID, preload) {
  1028.     perlID,
  1029.     19999,
  1030.     0b11111111111111111111111111101111,
  1031.     enabled,
  1032.     "Script",
  1033.     {    "Run Script…",             noIcon, "R",     noMark, plain,
  1034.         "Run Front Window",     noIcon, "R",     noMark, extend,
  1035.         "Syntax Check…",        noIcon, "K",     noMark, plain,
  1036.         "Check Front Window",    noIcon, "K",     noMark, extend,
  1037.         "-",                     noIcon, noKey,    noMark, plain,
  1038.         "Compiler Warnings",    noIcon, noKey,    noMark, plain,
  1039.         "Perl Debugger",        noIcon, noKey,    noMark, plain
  1040.     }
  1041. };
  1042.  
  1043. resource 'MENU' (editorID) {
  1044.     editorID,
  1045.     19999,
  1046.     0b1011,
  1047.     enabled,
  1048.     "Editor",
  1049.     {    "Edit…",                 noIcon, "E",     noMark,  plain,
  1050.         "Edit Front Window",     noIcon, "E",     noMark, extend,
  1051.         "-",                     noIcon, noKey,     noMark, plain,
  1052.         "Update…",                 noIcon, "U",     noMark, plain,
  1053.         "Update",                 noIcon, "U",     noMark, extend
  1054.     }
  1055. };
  1056.  
  1057. resource 'STR ' (helpID) {
  1058.     "Perl Help/H"
  1059. };
  1060.  
  1061.  
  1062. resource 'STR#' (256) {
  1063.     {
  1064.         "Indicates that this window is a modifiable text document.",
  1065.         "Indicates that this window is a read-only text document.",
  1066.         "Indicates that this window is a console window that is currently expecting input.",
  1067.         "Indicates that this window is a read-only console window.",
  1068.         "Indicates that this window is a console window that is not currently expecting input.",
  1069.     }
  1070. };
  1071.  
  1072. #include "MPTerminology.r"
  1073. #include "MPBalloons.r"
  1074.